
function init(){
	dojo.connect(dojo.byId("deltable"),"onclick", function(){
		if(confirm("Are You Sure to Delete This Table?")==true){

			var url = "ProcessTables?confirm=Y&uid="+document.getElementsByName("uid")[0].value+"&uAccess="+
							document.getElementsByName("uAccess")[0].value+"&tName="+document.getElementsByName("tName")[0].value;
			
			var x = dojo.xhrGet({
		      url: url,
		      load: function(response, ioArgs) { 
		        window.location="/DatabaseBrowser/Display.html";
			  	window.top.frames["menu"].location.reload();
		      },
		      error: function(response, ioArgs) { 
		        alert("ERROR:"+ ioArgs.xhr.status); 
		      },
			  sync: true
		    });
		}
	});
};

dojo.addOnLoad(init);
